Try hard to get a description if it's blank when we get here.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 17 Jun 2003 15:15:04 +0000 (15:15 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 17 Jun 2003 15:15:04 +0000 (15:15 +0000)
gpsbabel/waypt.c

index 9a5db5e7452e123620c1f8c027934837a2c67235..2aed2bbf656eba862f9a783e713afcca55f0cf9d 100644 (file)
@@ -72,10 +72,15 @@ waypt_add(waypoint *wpt)
                        }
                }
        }
-       if (wpt->description == NULL) {
+       if (wpt->description == NULL || strlen(wpt->description) == 0) {
+               if (wpt->description)
+                       xfree(wpt->description);
                if (wpt->notes != NULL) {
                        wpt->description = xstrdup(wpt->notes);
                }
+               if (wpt->shortname != NULL) {
+                       wpt->description = xstrdup(wpt->shortname);
+               }
        }
        waypt_ct++;
 }